package com.redsun.smallworld.gl.controls.parent;

import com.redsun.smallworld.gl.controls.OButton;
import com.redsun.smallworld.gl.controls.OImage;
import com.redsun.smallworld.gl.controls.moudle.ControlInfo;

/**
 * Created by zhebinwang on 2017/6/2.
 */
public class SuperControlFactory {

    public static SuperControl createSuperControl(ControlInfo controlInfo){


        if (controlInfo.getControlType().equals("button")){
            //按钮控件
            OButton oButton=new OButton(controlInfo);
            return oButton;
        }
        if (controlInfo.getControlType().equals("image")){
            //按钮控件
            OImage oImage=new OImage(controlInfo);
            return oImage;
        }

            return null;
    }
}
